import React from 'react';
import './CardList.css'
import Submit from "../submit";

/**
 * @author: RenLishisan
 * @description: 订单内容列表。接受一个父组件传递过来遍历好的数据直接展示。
 * @param: item
 * @return:
 * @time: 2020/10/30
 **/
class CardList extends React.Component {
    render() {
        const {item} = this.props
        return (
            <>
                {item &&
                <table className='card-list'>
                    <thead className='card-list-thead'>
                    <tr>
                        <td className='list-header-a'>
                            <span className='header-a-span'>{item.time}</span>
                            <span>订单号：{item.orderId}</span>
                        </td>
                        <td className='list-header-b'>店铺:{item.store}</td>
                        <td className='list-header-c'>来源平台:
                            <img className="tmImg"
                                 src="https://gw.alicdn.com/tfs/TB1caflgebviK0jSZFNXXaApXXa-32-16.png"
                                 alt="天猫"
                            />
                        </td>
                        <td className='list-header-d'>
                    <span>
                        <img className="order-bgImg"
                             src="http://lc-PaHnXV0g.cn-n1.lcfile.com/fb9f9750259a844379a4.png"
                             alt="编辑"
                        />
                    </span>
                        </td>
                    </tr>
                    </thead>
                    <tbody className='list-tbody'>
                    <tr>
                        <td className='list-tbody-a'>{item.orderName}
                            <img src='http://img.alicdn.com/tps/i2/T1S4ysXh8pXXXXXXXX-52-16.png' alt='保障卡'/>
                        </td>
                        <td className='list-tbody-b'>￥{item.orderPrice}</td>
                        <td className='list-tbody-c'>{item.quantity}件</td>
                        <td className='list-tbody-d'>￥{item.issuePrice}</td>
                        <td className='list-tbody-e'>
                            <Submit/>
                        </td>
                    </tr>
                    </tbody>
                </table>
                }
            </>
        )
    }
}

export default CardList;